<?php
abstract class YouNet_Db_TableReport extends YouNet_Db_Table
{
	public static function getAgeRange()
	{
		return array(
			array(
				'min' => 13,
				'max' => 17,
			),
			array(
				'min' => 18,
				'max' => 24,
			),
			array(
				'min' => 25,
				'max' => 34,
			),
			array(
				'min' => 35,
				'max' => 44,
			),
			array(
				'min' => 45,
				'max' => 54,
			),
			array(
				'min' => 55,
				'max' => 64,
			),
			array(
				'min' => 65,
			),
		);
	}
	public static function getDefaultDateRangeArray($strDateFrom,$strDateTo)
	{
		// takes two dates formatted as YYYY-MM-DD and creates an
		// inclusive array of the dates between the from and to dates.

		$arrRangeDefault = array();

		if ($strDateTo>=$strDateFrom)
		{
			$arrRangeDefault[date('Y-m-d',$strDateFrom)] = 0;
			while ($strDateFrom<$strDateTo)
			{
				$strDateFrom+=86400; // add 24 hours
				$arrRangeDefault[date('Y-m-d',$strDateFrom)] = 0;
			}
		}
		return $arrRangeDefault;
	}
	
}